package com.sanyu.controller.user;


import com.sanyu.pojo.dto.RepairmanDTO;
import com.sanyu.pojo.dto.UpdatePasswordDTO;
import com.sanyu.pojo.dto.UserDTO;
import com.sanyu.pojo.dto.UserLoginDTO;
import com.sanyu.pojo.vo.MessageVO;
import com.sanyu.pojo.vo.UserLoginVO;
import com.sanyu.pojo.vo.UserVO;
import com.sanyu.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user/user")
@Api("用户APP/用户相关接口")
public class UserController {

    @PostMapping("/login")
    @ApiOperation("学生用户登录")
    public Result login(@RequestBody UserLoginDTO userLoginDTO){
        UserLoginVO userLoginVO = new UserLoginVO();
        return Result.success(userLoginVO);
    }

    @PutMapping("/password")
    @ApiOperation("修改密码")
    public Result updatePwd(@RequestBody UpdatePasswordDTO updatePasswordDTO){
        return Result.success();
    }

    @GetMapping
    @ApiOperation("查询当前用户信息")
    public Result<UserVO> detail(){
        return Result.success(new UserVO());
    }

    @PutMapping
    @ApiOperation("修改用户信息")
    public Result update(@RequestBody UserDTO userDTO){
        return Result.success();
    }

}
